<?php
require_once 'global.php';

//接收参数
$username=addslashes(trim($_POST['username']));
$passwd=addslashes($_POST['passwd']);
$passwdagain=addslashes($_POST['passwdagain']);
$phone=addslashes($_POST['phone']);

//检测输入的用户名密码以及手机号
check_username($username);
check_passwd($passwd);
check_passwd($passwdagain);
check_passwd_isame($passwd, $passwdagain);
check_phone($phone);

create($username,$passwd,$phone);

echo to_json(ret_ok("login.html", "注册成功"));




